package com.example.fanqie.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import com.example.fanqie.entity.Author;
import com.example.fanqie.entity.Category;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface CategoryMapper extends BaseMapper<Category> {
    @Select("select  *" +
            "from  fq_category " +
            "where dlt = 1 ")
    List<Category> selectcategory();

    @Select("select  *" +
            "from  fq_category " +
            "where dlt = 1 and category_id = #{categoryId} ")
    Category selectcategoryId( @Param("categoryId") Integer categoryId);

}
